home *** CD-ROM | disk | FTP | other *** search
/ Apple Media Toolkit 1994 Winter-Spring / AMTK v8.iso / Getting Started / Aldus PageMaker 4.2 / Fraction.script < prev    next >
Encoding:
Text File  |  1991-12-13  |  1.6 KB  |  39 lines  |  [TEXT/MSWD]

  1. -- Script File
  2. -- For use with Aldus PageMaker v4.2
  3.  
  4. -- Fraction.script
  5. --This script will change the format and the appearance of a manually typed fraction. 
  6. --It substitutes a non-breaking fraction slash for a standard slash, 
  7. --then changes the numerator to a superscript character and the 
  8. --denominator to a subscript character. 
  9. --To run the script, type a fraction like 2/3. 
  10. --Insert the text cursor just to the right of the fraction (do not highlight the fraction)
  11. --Choose "Run Script..." from the “Aldus Additions” menu, select "Fraction.Script, " 
  12. --and click on the “Run File” button. 
  13.  
  14.  
  15. --Begin Script--
  16.  
  17. --selects and reformats numerator by making it a superscript character and adjusting the size and position.
  18. textselect -word
  19. typeoptions 80,58,33,0 --sets the type options for small caps and super/subscript. 
  20. --80=80% of type size for small caps size, 58=58% of type size for super/subscript size, 33=33% of type size above baseline, 0=0% below the baseline for subscript
  21. --The above values can be adjusted for better output with different type faces
  22.  
  23. position subscript -- sets the denominator to subscript
  24. textcursor -char
  25.  
  26. textselect +char  --selects regular slash (/)
  27. textenter "⁄"  --replaces / with option-shift-1 slash
  28.  
  29. --Selects and reformats numerator
  30. textcursor -char
  31. textselect -word
  32. typeoptions 80,58,33,0  --see same command above
  33. position superscript  --sets the numerator to superscript
  34.  
  35. --Leave the cursor where you started, ready to resume typing.
  36. textcursor +word
  37. textcursor +word
  38. position normal  --ensures that next characters entered at this position will be in the normal position
  39.